<template>
  <div>
    <h1>收货报表</h1>
    <ReportTable :dataList="report" :columns="columns" />
  </div>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue';
import { fetchGrReport } from '@/api/report';
import ReportTable from '@/components/ReportTable.vue';

const report = ref([]);
const columns = [
  { label: 'ID', field: 'id' },
  { label: '物料名称', field: 'itemName' },
  { label: '站点', field: 'siteInfo' },
  { label: '收货数量', field: 'grQty' },
  { label: '收货日期', field: 'grDate' }
];
onMounted(async () => {
  report.value = await fetchGrReport();
});
</script> 